<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Rifts.Controls">


	<!--<Style TargetType="{x:Type local:LabeledTextBlock}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:LabeledTextBlock}">
					<Grid x:Name="RootElement">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<Label x:Name="Label" Margin="0,0,2,0" Padding="0"  VerticalAlignment="Center" Content="{TemplateBinding LabelContent}" Style="{TemplateBinding LabelStyle}"/>
						<TextBlock Style="{TemplateBinding TextStyle}" Grid.Column="1" VerticalAlignment="Center" TextWrapping="Wrap" Text="{TemplateBinding Text}" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>-->


	<Style TargetType="{x:Type local:SectionPanel}">
		<!--<Setter Property="BorderBrush" Value="Black" />
		<Setter Property="BorderThickness" Value="1,0,1,1" />-->
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:SectionPanel}">
					<Border Background="{TemplateBinding Background}"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}">
						<StackPanel>
							<TextBlock Text="{TemplateBinding Header}" TextAlignment="Center" HorizontalAlignment="Stretch" Background="Black" Foreground="White" FontWeight="Bold" FontFamily="Palatino Linotype" Typography.Capitals="SmallCaps" />
							<ContentPresenter />
						</StackPanel>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="{x:Type local:GroupPanel}">
		<Setter Property="BorderBrush" Value="Black" />
		<Setter Property="BorderThickness" Value="0,0,0,1" />
		<Setter Property="HeaderFontSize" Value="8" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:GroupPanel}">
					<Border Background="{TemplateBinding Background}"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="24"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Border BorderBrush="Black" BorderThickness="1,0,1,0" Background="LightGray" VerticalAlignment="Stretch">
								<ItemsControl 
									VerticalAlignment="Center"
									ItemsSource="{TemplateBinding Header}" 
									 
									TextBlock.TextAlignment="Center" 
									TextBlock.FontWeight="Bold" 
									TextBlock.FontStretch="Condensed" 
									TextBlock.FontSize="{TemplateBinding HeaderFontSize}" 
									Padding="8,8,8,8" 
									FontFamily="Palatino Linotype" 
									Typography.Capitals="AllSmallCaps"/>
							</Border>


							<Border Padding="{TemplateBinding Padding}" Grid.Column="1">
								<ContentPresenter />
							</Border>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="{x:Type local:LabeledTextBlock}">
		<Setter Property="TextHeight" Value="16" />
		<Setter Property="HeaderFontSize" Value="12" />
		<Setter Property="Background" Value="White" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:LabeledTextBlock}" >
					<Border Name="MouseOverBorder"
							Background="{TemplateBinding Background}"
							BorderBrush="Transparent"
							BorderThickness="1">

						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation Duration="0"
														To="#FF99C1E2"
														Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
														Storyboard.TargetName="MouseOverBorder" />
									</Storyboard>

								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>

						<StackPanel Orientation="{TemplateBinding Orientation}" >
							<TextBlock Name="HeaderPart" Text="{TemplateBinding Header}" TextAlignment="Left" FontSize="{TemplateBinding HeaderFontSize}" Width="{TemplateBinding HeaderWidth}" FontFamily="Palatino Linotype" Typography.Capitals="SmallCaps"/>
							<Border Name="TextPart" BorderBrush="Black" BorderThickness="0,0,0,1" Height="{TemplateBinding TextHeight}" Padding="2,0,2,0" Margin="2,0,2,0" >
								<Viewbox>
									<TextBlock Text="{TemplateBinding Text}" FontFamily="Comic Sans MS" TextAlignment="Center"/>
								</Viewbox>
							</Border>
							<Border>
								<ContentPresenter />
							</Border>
						</StackPanel>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="{x:Type local:CalculatedTextBlock}">
		<Setter Property="TextHeight" Value="16" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:CalculatedTextBlock}" >
					<Border BorderBrush="Black" BorderThickness="0,0,0,1" Height="{TemplateBinding TextHeight}" Width="{TemplateBinding TextWidth}" Padding="2,0,2,0">
						<Viewbox>
							<TextBlock Text="{TemplateBinding Text}" FontFamily="Comic Sans MS" TextAlignment="Center"/>
						</Viewbox>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>
